import Vue from 'vue'
import router from './router'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import * as echarts from 'echarts'
import TreeTable from 'vue-table-with-tree-grid'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'

import request from './request.js'

Vue.prototype.$http = request


//手动注册
Vue.component('tree-table', TreeTable)
// Vue.prototype.$http = axios
Vue.prototype.$echarts = echarts
// axios.defaults.baseURL = 'http://127.0.0.1:8888'
//axios请求头设置
// axios.interceptors.request.use(config => {
// 	if (!window.sessionStorage.getItem("access_token")) {
// 		config.headers.Authorization = "Bearer " + window.sessionStorage.getItem("access_token");
// 	}
// 	return config;
// })



// 处理跨域问题
Vue.prototype.HOST = "/api";

//取消 Vue 所有的日志与警告。
Vue.config.silent = true
//设置为 false 以阻止 vue 在启动时生成生产提示。
Vue.config.productionTip = false;
//70为header高度，20*2为el-main的上下padding,15为面包屑的magring-buttom,20为面包屑的高度
Vue.prototype.$ExtraHeight = (72 + 15 * 2 + 20 + 5);


Vue.use(ElementUI)

new Vue({
	router,
	render: h => h(App),
}).$mount('#app')
